package top.toptimus.dto.measure;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class InspectSizeDTO {
    private String id;//id
    private Integer index;//序号
    private String itemNameCn;//大分类名称
    private Double garmentSize;//成衣尺寸
    private Double inValue;    //  加值
    private Double outValue;   //  减值
    private String parentId;//父id
    private boolean ifPass;//是否通过
    private boolean hasFitValue;//是否人尺寸
    private boolean hasGarmentSize;//是否成衣尺寸
    private boolean hasHalf;//是否1/2

    public InspectSizeDTO(MeasureItemDTO measureItemDTO, MeasureItemDTO itemDTO) {
        this.id = measureItemDTO.getId();
        this.index = measureItemDTO.getIndex();
        this.itemNameCn = measureItemDTO.getItemNameCn();
        this.garmentSize = itemDTO.getGarmentSize();
        this.inValue = measureItemDTO.getInValue();
        this.outValue = measureItemDTO.getOutValue();
        this.parentId = measureItemDTO.getParentId();
        this.ifPass = false;
        this.hasFitValue = measureItemDTO.isHasFitValue();
        this.hasGarmentSize = measureItemDTO.isHasGarmentSize();
        this.hasHalf = measureItemDTO.isHasHalf();
    }
}
